package com.czwx.bee.business.manager.modular.cloanuser.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户认证实体
 *
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="CloanUserAuth",description="用户授权对象")
 public class CloanUserAuth implements Serializable {

    private static final long serialVersionUID = 1L;

	@ApiModelProperty(value="id")
	private Long id;

	@ApiModelProperty(value="id")
	private Long userId;

	@ApiModelProperty(value="身份认证状态")
	private String idState;

	@ApiModelProperty(value="紧急联系人状态")
	private String contactState;

	@ApiModelProperty(value="银行卡状态")
	private String bankCardState;

	@ApiModelProperty(value="信用卡状态")
	private String creditCardState;

	@ApiModelProperty(value="芝麻授信状态")
	private String zhimaState;

	@ApiModelProperty(value="手机运营商认证状态")
	private String phoneState;

	@ApiModelProperty(value="工作信息状态")
	private String workInfoState;

	@ApiModelProperty(value="更多信息状态")
	private String otherInfoState;
	
	@ApiModelProperty(value="邮箱认证状态")
	private String emailState;
	
	@ApiModelProperty(value="运营商认证状态修改时间")
	private Date phoneStateUpdateTime;

	@ApiModelProperty(value="身份认证时间")
	private String idAuthTime;

	@ApiModelProperty(value="紧急联系人时间")
	private String contactAuthTime;

	@ApiModelProperty(value="银行卡认证时间")
	private String bankCardAuthTime;

	@ApiModelProperty(value="信用卡认证时间")
	private String creditCardAuthTime;

	@ApiModelProperty(value="芝麻授信时间")
	private String zhimaAuthTime;
	
	@ApiModelProperty(value="运营商认证状态是否失效，不持久化")
	private boolean phoneStateValid;

	@ApiModelProperty(value="运营商三要素是否一致  true 一致  false 不一致")
	private String phoneConsistent;

	@ApiModelProperty(value="信用卡姓名 比对 注册信息")
	private String creditCardConsistent;

	public Boolean getPhoneConsistent() {
		if(!"false".equals(phoneConsistent)){
			return true;
		}
		return Boolean.parseBoolean(phoneConsistent);
	}

	public Boolean getCreditCardConsistent() {
		if(!"false".equals(creditCardConsistent)){
			return true;
		}
		return Boolean.parseBoolean(creditCardConsistent);
	}
}